package com.wuming.house.service;

import com.wuming.house.core.BusinessException;
import com.wuming.house.model.CateHouse;
import com.wuming.house.model.GroupHouse;

import java.util.List;

public interface CateHouseService {

    /**
     * 保存分类房产信息
     *
     * @param ch 分类房产信息
     * @throws BusinessException
     */
    void saveCateHouse(CateHouse ch) throws BusinessException;

    /**
     * 根据分类id查询分组房产信息
     *
     * @param cateId      分类id
     * @param houseName   楼盘名称
     * @param area        楼盘区域
     * @param price       楼盘价格
     * @param houseLayout 楼盘户型
     * @return 分类房产信息
     * @throws BusinessException
     */
    List<CateHouse> getHouseByParams(Integer cateId, String houseName, String area, String price, String houseLayout, int pageIndex, int pageSize) throws BusinessException;

    int getTotal(Integer cateId) throws BusinessException;

    CateHouse getHouseCateByCateIdAndHouseId(Long cateId, Long houseId) throws BusinessException;

    /**
     * 根据楼盘id删除分组房产信息
     * @param houseId
     * @throws BusinessException
     */
    void deleteByHouseId(Long houseId) throws BusinessException;

    void deleteByParams(Long houseId,Integer cateId);

    int getHouseTotal(Integer cateId, String houseName, String area, String  price, String houseLayout);
}
